using ASP;
using HoWave.Common;
using HoWave.Web;
using HoWave.Web.Shop.Member;
using System;
using System.Web.Profile;
using System.Web.SessionState;
using System.Web.UI.WebControls;
public class Member_Shop_Identify : Member, IRequiresSessionState
{
	private Shop_Application _application;
	protected bool ShowShop = false;
	protected HyperLink hlPersonIdentifyStatus;
	protected HyperLink hlCompanyIdentify;
	protected Literal BandShopIdentify;
	protected GridView GridView1;
	protected Shop_Application m_Application
	{
		get
		{
			Shop_Application application;
			if (this._application == null)
			{
				this._application = new Shop_Application(this.conn);
				application = this._application;
			}
			else
			{
				application = this._application;
			}
			return application;
		}
	}
	protected DefaultProfile Profile
	{
		get
		{
			return (DefaultProfile)this.Context.Profile;
		}
	}
	protected global_asax ApplicationInstance
	{
		get
		{
			return (global_asax)this.Context.ApplicationInstance;
		}
	}
	protected void Page_Load(object sender, EventArgs e)
	{
		this.InitPage();
		this.GetIdentifyStatus();
		string sql = "select shopid from hlshop_shop where  ShopOwnerID=" + base.user.UserID;
		int num = this.conn.ExecuteCount(sql);
		if (base.user.ShopID > 0 || num > 0)
		{
			this.ShowShop = true;
		}
	}
	protected void InitPage()
	{
		this.GridView1.DataSource = this.m_Application.GetApplicationTimeStatusByUserID(base.user.UserID);
		this.GridView1.DataBind();
	}
	protected void GetIdentifyStatus()
	{
		base.user.GetUserInfor();
		if (base.user.IdVerifiy == 1)
		{
			this.hlPersonIdentifyStatus.Text = Language.GetMemberMsg("Ventify/PassIDVentify", new string[0]);
		}
		else
		{
			if (base.user.IdVerifiy == 9)
			{
				this.hlPersonIdentifyStatus.Text = Language.GetMemberMsg("Ventify/IDVentifing", new string[0]);
				this.hlPersonIdentifyStatus.NavigateUrl = "../Credit/Identify_user.aspx";
				this.hlPersonIdentifyStatus.Target = "_blank";
			}
			else
			{
				this.hlPersonIdentifyStatus.Text = Language.GetMemberMsg("Ventify/UnPassIDVentify", new string[0]);
				this.hlPersonIdentifyStatus.NavigateUrl = "../Credit/Identify_user.aspx";
				this.hlPersonIdentifyStatus.Target = "_blank";
			}
		}
		if (base.user.CompanyVerifiy == 1)
		{
			this.hlCompanyIdentify.Text = Language.GetMemberMsg("Ventify/PassCompanyVentify", new string[0]);
		}
		else
		{
			if (base.user.CompanyVerifiy == 9)
			{
				this.hlCompanyIdentify.Text = Language.GetMemberMsg("Ventify/CompanyVentifing", new string[0]);
				this.hlCompanyIdentify.NavigateUrl = "../Credit/Identify_company.aspx";
				this.hlCompanyIdentify.Target = "_blank";
			}
			else
			{
				this.hlCompanyIdentify.Text = Language.GetMemberMsg("Ventify/UnPassCompanyVentify", new string[0]);
				this.hlCompanyIdentify.NavigateUrl = "../Credit/Identify_company.aspx";
				this.hlCompanyIdentify.Target = "_blank";
			}
		}
		if (base.user.BandShopVerifiy == 1)
		{
			this.BandShopIdentify.Text = Language.GetMemberMsg("Ventify/PassBandShopVerifiy", new string[0]);
		}
		else
		{
			this.BandShopIdentify.Text = Language.GetMemberMsg("Ventify/UnPassBandShopVerifiy", new string[0]);
		}
	}
	protected string GetType(string str)
	{
		string result;
		if (str != null)
		{
			if (str == "1")
			{
				result = Language.GetMemberMsg("Ventify/Type/Type1", new string[0]);
				return result;
			}
			if (str == "2")
			{
				result = Language.GetMemberMsg("Ventify/Type/Type2", new string[0]);
				return result;
			}
			if (str == "3")
			{
				result = Language.GetMemberMsg("Ventify/Type/Type3", new string[0]);
				return result;
			}
			if (str == "4")
			{
				result = Language.GetMemberMsg("Ventify/Type/Type4", new string[0]);
				return result;
			}
		}
		result = "";
		return result;
	}
}
